// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import mintUI from 'mint-ui'
import vueResource from 'vue-resource'
import moment from 'moment'
import common from './api/common'
import {Toast} from 'mint-ui'

import 'mint-ui/lib/style.min.css'
import '../static/mui/css/mui.css'
import '../static/mui/css/icons-extra.css'
import '../static/css/site.css'

Vue.config.productionTip = false
Vue.use(mintUI)
Vue.use(vueResource)
Vue.filter('datefmt', function (input, fmtStr) {
  fmtStr = fmtStr ? fmtStr : 'YYYY-MM-DD'
  return moment(input).format(fmtStr)
})
Vue.prototype.$apidomain = common.apidomain
Vue.prototype.$tip = Toast
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
